/**
 * Copyright (C) 2010 Neofonie GmbH
 *
 * This programm is free software; you can redistribute it and/or modify
 * it under the terms of the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package eu.dicodeproject.twitterstream;

/**
 * Objects of this class store results of command line parsing. General bean semantics hold, common methods are
 * over written.
 */
public class Parameters {
  private String username;
  private String password;
  private String tablename;

  // GENERATED CODE FROM INTELLIJ ALL THE WAY TO THE BOTTOM //

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public String getTablename() {
    return tablename;
  }

  public void setTablename(String tablename) {
    this.tablename = tablename;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Parameters that = (Parameters) o;

    if (password != null ? !password.equals(that.password) : that.password != null) return false;
    if (tablename != null ? !tablename.equals(that.tablename) : that.tablename != null) return false;
    if (username != null ? !username.equals(that.username) : that.username != null) return false;

    return true;
  }

  @Override
  public int hashCode() {
    int result = username != null ? username.hashCode() : 0;
    result = 31 * result + (password != null ? password.hashCode() : 0);
    result = 31 * result + (tablename != null ? tablename.hashCode() : 0);
    return result;
  }

  @Override
  public String toString() {
    return "Parameters{" +
        "username='" + username + '\'' +
        ", password='" + password + '\'' +
        ", tablename='" + tablename + '\'' +
        '}';
  }
}
